<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
Function.prototype
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="Function.prototype";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">&nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>ObKit</B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../F.html"><B>PREV CLASS</B></A><!-- 
   NEXT CLASS 
-->
&nbsp;<A HREF="../GLOBALS.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>

<!-- ======== START OF CLASS DATA ======== -->
<H2>Class Function.prototype</H2>
<PRE>Object
   |
   +--<b>Function.prototype</b>
</PRE>


<HR>
<DL>
   <!-- Class definition -->
   <DT>class 
   <B>Function.prototype</B>
   

</DL>
   
   <HR>

<!-- ======== NESTED CLASS SUMMARY ======== -->

<!-- ======== END NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


   

<!-- =========== END FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<!-- ======== END CONSTRUCTOR SUMMARY ======== -->

&nbsp;

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>


   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;Function</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#__F.bind">__F.bind</A></B>(&lt;Object&gt; scope)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Bind or curry a function by supplying an object scope followed by 
 any number of arguments.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;Object</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#__F.defer">__F.defer</A></B>(&lt;Number&gt; interval, &lt;Object&gt; scope)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Defer a function for execution at a later time.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;Boolean</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#__F.is">__F.is</A></B>(&lt;Object&gt; value)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Determine if an object was constructed by a particular constructor, and 
 only that constructor.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;Boolean</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#__F.type">__F.type</A></B>(&lt;Object&gt; value)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Determine if an object was constructed by this function or one
 of its subclasses.
      </TD>
   </TR>


</TABLE>



<P>
<!-- ========== END METHOD SUMMARY =========== -->


<!-- ============ FIELD DETAIL START =========== -->


<!-- ============ FIELD DETAIL END =========== -->

    <!-- ========= CONSTRUCTOR DETAIL START ======== -->


<!-- Constructor return value(s) -->

<!-- End constructor return value(s) -->

<!-- ADDITIONAL ATTRIBUTES -->

<HR/>
<!-- END ADDITIONAL ATTRIBUTES  -->

<!-- ========= CONSTRUCTOR DETAIL END ======== -->


<!-- ============ METHOD DETAIL START ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
      <TD COLSPAN=1><FONT SIZE="+2">
         <B>Method Detail</B></FONT>
      </TD>
   </TR>
</TABLE>

<!-- One single method detail entry -->

   <A NAME="__F.bind"><!-- --></A>
   <H3>__F.bind</H3>
   <PRE>Function <B>__F.bind</B>(&lt;Object&gt; scope)</PRE>
   
      <UL>Bind or curry a function by supplying an object scope followed by 
 any number of arguments. If null or undefined is supplied for the
 scope argument, the function will execute in the global scope.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>scope</CODE> -       The object scope to execute the method in.  
      </UL> 
   
     <UL><CODE>rest</CODE> -     Any number of arguments.  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
                 A curried function.   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="__F.defer"><!-- --></A>
   <H3>__F.defer</H3>
   <PRE>Object <B>__F.defer</B>(&lt;Number&gt; interval, &lt;Object&gt; scope)</PRE>
   
      <UL>Defer a function for execution at a later time. The returned object
 provides the means to further control the execution of the method and
 has the following properties:
 
 <code>
     hasExecuted:Boolean    whether or not the function has executed
 </code>
 <code>    
     createdOn:Number       the UTC time at which the deferred function 
                            was created.
 </code>
 <code>
     interval:Number        the number of milliseconds until the deferred
                            function will be executed
 </code>
 <code>
     result:Object          the result of the deferred functions execution, 
                            assuming it returns a value. This property is
                            set after the deferred function has been
                            executed.
 </code>
 <code>
     fault:Error            an error object if there was a problem 
                            executing the function. This property is
                            set after the deferred function has been
                            executed.
 </code>
 <p>
 The returned object has the following methods:
 </p>
 <code>
     execute                Executes the function, then disposes of it
                            to aid garbage collection. This method can
                            be invoked at any time, lest you need to
                            execute the deferred method before the 
                            interval expires. Note that after invoking
                            this method, the deferred function cannot
                            be executed again.
 </code>
 <code>                           
     dispose                Dispose of the function. The deferred 
                            method will be cancelled and not invoked
                            again.
 </code>
 <p>
 You can also define a callback by adding a function called 'onExecute'
 to the returned object. The callback will be parameterised with a
 boolean value of true or false pending on whether the deferred function
 executed normally or encountered a fault while executing.
 </p>
 <code>
 
     function sayHi ()
     {
         sayIt('hi');
     };
     
     function sayIt (message)
     {
         alert(message);
     };
     
     // defer execution for 100 milliseconds
     var deferred= sayHi.defer(100);
     // add a callback
     deferred.onExecute= function (status)
     {
         if (status)
             alert('executed ok');
         else
             alert('dammit');
     };
     
     // if you left the above alone, the sayHi method would be executed
     // in 100 milliseconds time (or thereabouts- timeout is not exact)
     // but lets say that for some reason you want to execute in advance
     // of the interval expiring. You can invoke the execute method
    
     deferred.execute(); 
     
     // that would have invoked the onExecute call back if one had been
     // defined and set the hasExecuted, fault, result values and then
     // called the dispose method afterward
      
     // if you wanted to determine the time expired, this is how you
     // you would do it
     
     var now= new Date().getTime()
     ,   duration= now - deferred.createdOn
     ,   timeRemainingIfIHadntExecuted= deferred.interval - duration
 
     // alternatively, you may want to abort a deferred method. Assuming
     // you haven't already executed, you can just do this
     
     deferred.dispose(); 
     
     // that cancelled the deferred method from executing and removed
     // some internal references to faciliate garbage collection. The
     // onExecute call back was not invoked, and no other properties
     // were changed
 
 </code></UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>interval</CODE> -    The number of milliseconds to expire before                              executing this function  
      </UL> 
   
     <UL><CODE>scope</CODE> -       Optional. An object scope in which to                              execute this function  
      </UL> 
   
     <UL><CODE>rest</CODE> -     Any number of arguments to curry the                              function with  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
                   The deferred object detailed above.   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <UL>   
   <B>See:</B><UL>- Function#bind</UL>
   </UL>
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="__F.is"><!-- --></A>
   <H3>__F.is</H3>
   <PRE>Boolean <B>__F.is</B>(&lt;Object&gt; value)</PRE>
   
      <UL>Determine if an object was constructed by a particular constructor, and 
 only that constructor.
 
 <code>
 
function Superconstuctor () {};
     
     Constructor.inherits(Superconstructor);
function Constructor () {};
     
     alert(Object.is(new Constructor)); // false- not constructed by Object
     alert(Object.type(new Constructor)); // true- inherits from Object
     alert(Constructor.type(new Constructor)); true- constructed by Constructor
     alert(Superconstructor.is(new Constructor)); // false- not constructed by Superconstructor
     alert(Superconstructor.type(new Constructor)); // true
     
 
 </code></UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>value</CODE> -     Any value.  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
                Whether or not   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <UL>   
   <B>See:</B><UL>- Function#type</UL>
   </UL>
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="__F.type"><!-- --></A>
   <H3>__F.type</H3>
   <PRE>Boolean <B>__F.type</B>(&lt;Object&gt; value)</PRE>
   
      <UL>Determine if an object was constructed by this function or one
 of its subclasses. As a convenience, this method elides the distinction
 between primitive values and their object counterparts. This rule
 applies to string, number and boolean only. 
 
 <code>
     
     var primitive= 'string';
     alert(primitive instanceof Object); // false
     alert(primtiive instanceof String); // false!
     
     // this means checking for strings can be a paaaaiiin
     
     isString= 'string' === typeof value || value instanceof String
     
     // this way, its much easier, and the method is available on
     // every constructor, including your own.
     
     alert(String.type(primitive)); // true!
     alert(Number.type(0)); // true!
     alert(Boolean.type(false)); // true!
 
     // and of course, it works for your own objects as well
     
     function WhizzbangSuperDuperClass ()
     {
         ;
     };
     
     var instance= new WhizzbangSuperDuperClass;
     
     alert(WhizzbangSuperDuperClass.type(instance)); // true
 
 
 </code></UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>value</CODE> -     Any value.  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
                Whether or not a value is considered a type.   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <UL>   
   <B>See:</B><UL>- Function#is</UL>
   </UL>
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>



<!-- ============ METHOD DETAIL END ========== -->

<!-- ========= END OF CLASS DATA ========= -->

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>ObKit</B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../F.html"><B>PREV CLASS</B></A><!-- 
   NEXT CLASS 
-->
&nbsp;<A HREF="../GLOBALS.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>

<!-- =========== END OF NAVBAR =========== -->

<HR>
<FONT SIZE="-1">

</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Thu Aug 12 14:06:52 2010</div>
</BODY>
</HTML>
